This is one of a series of functions that are able to generate a number of variations from a symbol-pattern. The 'theme' (symbol-pattern) is always stated in the output first followed sequentially by the <number> of variants.
(setq mel (gen-variants-tfc 0.345 3 nil '(a b c d)))
--> (a b c d = b b e e c d e g f = d)
Each variant is transposed up one symbol position, (a b c d) becoming (b c d e) and so on. The function find-change replaces repeated symbols inside each variant with a pause.
Step value allows the variation sequence to be entered as any point. For example:
(setq mel1 (gen-variants-tfc 0.234 3 3 '(a b c d)))
--> (a b c d d f = d)
Or, more extreme:
(gen-variants-tfc 0.3 3 5 '(a b c d))
--> (a b c d i = = = g h f = d = = =)
Should you wish to remove the 'theme' from the output statement use the nthcdr function:
(setq mel2 (nthcdr 4 (gen-variants-tfc nil 3 nil '(a b c d))))